import java.util.regex.Matcher;
import java.util.regex.Pattern;


public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		/*
		String aaa = "qqqwwweeerr,wweerr";
		String[] b = aaa.split(",");
		System.out.println(b[0]);
		System.out.println(b[1]);
		*/
		
		Pattern p = Pattern.compile("([a-zA-Z0-9]+),([a-zA-Z0-9]+)");
		
		Matcher m = p.matcher("dddq2DF,dsdstre4");
		
		boolean b = m.matches();
		
		
		
		String x = m.group(1);
		String y = m.group(2);
		
		System.out.println(b);
		System.out.println(x);
		System.out.println(y);
		 
	}

}
